import  {createStore,applyMiddleware} from 'redux';
// import rootReduer from './reducers';
import createRootReducer from './reducers';
import thunk from 'redux-thunk'
//01 引包
import {createBrowserHistory} from 'history';
import { routerMiddleware } from 'connected-react-router'

//02 创建history
export const history  = createBrowserHistory()

//03 集成redux
export const store = createStore(createRootReducer(history),applyMiddleware(routerMiddleware(history),thunk))


